<div class="container">
  <h1>get_num_segments()</h1>
  <p class="signature">function get_num_segments(): int</p>
  <h2>Description</h2>
  <div class="description">
    <p>
      Retrieves the number of segments in the current URL after the base URL. It calculates the number of segments by removing the base URL and then splitting the remaining path into segments using '/' as the delimiter.
    </p>
  </div>
  <h2>Parameters</h2>
  <table>
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        <th>Default</th>
        <th>Required</th>
      </tr>
    </thead>
    <tbody>
      <!-- This method does not accept any parameters -->
      <tr>
        <td colspan="5">This method does not accept any parameters.</td>
      </tr>
    </tbody>
  </table>
  <h2>Return Value</h2>
  <table>
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>int</td>
        <td>The number of URL segments after the base URL.</td>
      </tr>
    </tbody>
  </table>
  <h2>Example Usage</h2>
  <div class="example">
    <pre>$num_url_segments = get_num_segments();</pre>
  </div>
</div>
